package cn.lliiooll.launcher.window;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import cn.lliiooll.launcher.ClientLauncher;

public class TextListener implements ActionListener{

	@Override
	public void actionPerformed(ActionEvent e) {
		if(e.getSource().equals(MainWindow.chatf)) {
			MainWindow.chats.insert("[lliiooll] " + MainWindow.chatf.getText() + "\n", ClientLauncher.i);
			MainWindow.chatf.setText(""); 
			ClientLauncher.i--;
			if(ClientLauncher.i == 0) {
				ClientLauncher.i = 99999;
			}
		}
		
	}

}
